#pragma once

#include "proxy/common/factory.h"
#include "config.h"


struct Router;
struct Tunnel;

struct Client {

  explicit Client (const Config& cfg);

  void run ();
  void shutdown ();


private:
  const Config& _cfg;
  Router* _router;
  Tunnel* _tunnel;

  std::mutex _close_mutex;
  volatile bool _closed {false};
};